package com.power.flowable.model;


import com.plf.core.common.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
*  流程环节字段配置实体类
*/

@Entity
@ApiModel(value="流程环节字段配置")
@Data
@Table(name="Act_dsn_form_stepfield")
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
//@IdClass(Act_dsn_form_stepfield.Act_dsn_form_stepfieldPK.class) 用于复合组件
public class Act_dsn_form_stepfield extends BaseModel implements Serializable {

	private static final long serialVersionUID = 1L;

    @Id
    @Setter(AccessLevel.NONE)
    private String id;

    @ApiModelProperty(value = "引用表单id")
    private String formid_;

    @ApiModelProperty(value = "环节id")
    private String stepid_;

    @ApiModelProperty(value = "字段")
    private String field_;

    @ApiModelProperty(value = "显示状态")
    private Integer status_;

    @ApiModelProperty(value = "自动填充内容")
    private String value_;

    @ApiModelProperty(value = "关联流程变量名")
    private String variname_;

    @ApiModelProperty(value = "字段显示的名称")
    private String label_;

    @ApiModelProperty(value = "排序索引")
    private Integer indexsort;


    public Map<String, Object> parseMap() {
        Map<String, Object> map=new HashMap<>();
        map.put("id", this.getId());
        map.put("formid_", this.getFormid_());
        map.put("stepid_", this.getStepid_());
        map.put("field_", this.getField_());
        map.put("status_", this.getStatus_());
        map.put("value_", this.getValue_());
        map.put("variname_", this.getVariname_());
        map.put("label_", this.getLabel_());
        map.put("indexsort", this.getIndexsort());
        return map;
    }

    public String getId() {
        return id;
    }

    public void setId(Serializable id) {
        this.id = (String) id;
    }

    public Serializable getPrimaryKey() {
        return id;
        // return new Act_dsn_form_stepfieldPK(id, id2); 用于复合主键，请手动创建内部静态类
    }

    public void setPrimaryKey(Serializable key) {
        this.id = (String)key;

        //Act_dsn_form_stepfieldPK pk = (Act_dsn_form_stepfieldPK) key; 用于复合主键
        //this.id = pk.getId();
        //this.id2 = pk.getId2();
    }

}
